﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace Sublimation
{
    public class HealingBall : EnergyBall
    {
        public HealingBall(WorldProperties worldproperties, GameObject target, Vector2 position, float energyTransported)
            : base(worldproperties, target, position, energyTransported)
        {
            Scale = 0.5f;
        }

        public override void CheckCollisions(Microsoft.Xna.Framework.GameTime gameTime)
        {
            if (CollidesWith(target))
            {
                ((EnemyUnit)target).Life += energyTransported;
                Kill();
            }
        }

        protected override void LoadContent()
        {
            base.LoadContent();
            Sprite = Game.Content.Load<Texture2D>("Decals/healing");
        }
    }
}
